-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] make ProcessFD, [Client,Server]Connection non copyable. #41106
Conversation
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
@@ -299,32 +280,19 @@ ProcessFD &ProcessFD::operator=(ProcessFD &&other) { | |||
return *this; | |||
} | |||
|
|||
intptr_t ProcessFD::CloneFD() const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not used now btw? (I assume yes given deleting copy constructor just succeeds?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not used anywhere
|
||
void ProcessFD::CloseFD() { fd_ = -1; } | ||
fd_ = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm interseting... this seems actually never used (existing closeFd)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed
…roject#41106) These classes carry system resources (FDs) and are not meant to be copied (and dup'd) so to avoid accidental copy we delete the copy constructors. also removed a dynamic_pointer_cast since it's an upcast so static suffices.
These classes carry system resources (FDs) and are not meant to be copied (and
dup
'd) so to avoid accidental copy we delete the copy constructors.also removed a dynamic_pointer_cast since it's an upcast so
static
suffices.